package com.briup.jd2511.jd2511bookstore.controller;

import com.briup.jd2511.jd2511bookstore.response.Result;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ErrorController {
    @GetMapping("/filterError")
    public Result<String> filterError(HttpServletRequest request) throws Exception {
        throw (Exception) request.getAttribute("exception");
    }
}
